#include <iostream>

using namespace std;

class Integer{
public:
	Integer( int i ) : m_i(i) {}
	Integer operator+(Integer const& that)const{
		return m_i + that.m_i;
	}
private:
	int m_i;
};

template <typename T>
class CMath{
public:
	CMath( T const& t1,T const t2 ) : m_t1(t1), m_t2(t2){}
	T add( ){
		return m_t1 + m_t2;
	}
private:
	T m_t1;
	T m_t2;
};

/*
class CMath<int<{
public:
	// This part will be contented when create a subject.
	CMath<int>(int const& t1, int const& t2) : m_t1(t1), m_t2(t2){	}

	// When you are using add function, the function will be create.
	int add( ) { return m_t1 + m_t2; }
private:
	int m_t1;
	int m_t2;
};
*/
int main( ) {
	Integer ix = 100, iy = 200;
	CMath<Integer> m2(ix, iy);
	m2.add( );

	int nx = 10, ny = 20;

	CMath<int> m(nx, ny);
	m.add( );

	return 0;
}
